package com.mt.roll.wms.service.impl;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.mt.roll.core.base.BaseService;
import com.mt.roll.core.dal.service.StorageBoxCircInfoHisServiceBiz;
import com.mt.roll.core.vo.PageVo;
import com.mt.roll.core.vo.R;
import com.mt.roll.wms.mapper.StorageBoxCircInfoHisVoMapper;
import com.mt.roll.wms.params.StorageBoxCircInfoHisQueryParam;
import com.mt.roll.wms.service.StorageBoxCircInfoHisService;
import com.mt.roll.wms.vo.StorageBoxCircInfoHisVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

/**
 * @auther why
 * @date 2021/9/27 10:46
 */
@Service
@Transactional
public class StorageBoxCircInfoHisServiceImpl extends BaseService implements StorageBoxCircInfoHisService {

    @Autowired
    private StorageBoxCircInfoHisServiceBiz storageBoxCircInfoHisServiceBiz;

    @Autowired
    private StorageBoxCircInfoHisVoMapper storageBoxCircInfoHisVoMapper;

    @Override
    public R<PageVo<StorageBoxCircInfoHisVo>> pageByCode(StorageBoxCircInfoHisQueryParam storageBoxCircInfoHisQueryParam) {
        IPage<StorageBoxCircInfoHisVo> page = storageBoxCircInfoHisVoMapper.pageByCode(new Page<>(storageBoxCircInfoHisQueryParam.getCurrent(),storageBoxCircInfoHisQueryParam.getSize()), storageBoxCircInfoHisQueryParam);
        return successful(new PageVo<>(page,StorageBoxCircInfoHisVo.class));
    }
}
